﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 静态方法和静态变量
{
    class Program
    {
        static void Main(string[] args)
        {
            Sample s = new Sample();
            Sample s1 = new Sample();
            //s.SampleMethon();//错误
            Sample.SampleMethon();
            Console.WriteLine(Sample.count++);
        }
    }
    class Sample
    {
        public static int count = 0;
        public int a = 0;
        public static void SampleMethon()
        {
            Console.WriteLine("The Static Methon");
        }
        public Sample()
        {
            count++;
        }
    }
}
